package global

import (
	"hft/config"

	"github.com/go-redis/redis"
	"github.com/oschwald/geoip2-golang"
	"github.com/spf13/viper"
	"go.mongodb.org/mongo-driver/mongo"
	"go.uber.org/zap"
	"golang.org/x/sync/singleflight"
	"gorm.io/gorm"
)

var (
	OC_CONFIG    config.Server //config.yaml配置目录
	OC_VP        *viper.Viper  //全局配置viper
	OC_DB        *gorm.DB      //数据库
	OC_ROUTE_LOG *zap.Logger   //全局路由日志
	OC_REDIS     *redis.Client //缓存
	OC_MON       *mongo.Client //mongodb
	OC_MON1      *mongo.Client
	OC_GEO       *geoip2.Reader //ip库

	OC_Concurrency_Control = &singleflight.Group{}
)
